package com.dawn.usermanage.bean;

import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * The persistent class for the tw_sinainfo database table.
 * 
 */
@Entity
@Table(name = "tw_sinainfo")
public class SinaInfoBean implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String sinaId;
	// 微博昵称
	private String screenName;
	// 性别,m--男，f--女,n--未知
	private String gender;
	// 粉丝数
	private int fansNum;
	// 关注数
	private int followNum;
	// 本站关注数
	private int localFollowNum;
	// 微博数
	private int statusesCount;
	// 描述
	private String description;
	// 头像
	private String profileImageUrl;
	private String profileBackgroundImageUrl;
	private String profileBackgroundTile;

	private String province;
	private String city;

	// 标签
	private String tags;

	private String location;
	// 用户个人主页
	private String url;
	// 创建时间
	private Calendar createdAt;
	// 加V标示，是否微博认证用户
	private boolean verified;

	@OneToOne(mappedBy = "sinaInfoBean")
	private UserBean tuUserinfo;

	public String getSinaId() {
		return this.sinaId;
	}

	public void setSinaId(String sinaId) {
		this.sinaId = sinaId;
	}

	public int getFansNum() {
		return this.fansNum;
	}

	public void setFansNum(int fansNum) {
		this.fansNum = fansNum;
	}

	public int getFollowNum() {
		return this.followNum;
	}

	public void setFollowNum(int followNum) {
		this.followNum = followNum;
	}

	public int getLocalFollowNum() {
		return this.localFollowNum;
	}

	public void setLocalFollowNum(int localFollowNum) {
		this.localFollowNum = localFollowNum;
	}

	public String getScreenName() {
		return this.screenName;
	}

	public void setScreenName(String screenName) {
		this.screenName = screenName;
	}

	public UserBean getTuUserinfo() {
		return this.tuUserinfo;
	}

	public void setTuUserinfo(UserBean tuUserinfo) {
		this.tuUserinfo = tuUserinfo;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public int getStatusesCount() {
		return statusesCount;
	}

	public void setStatusesCount(int statusesCount) {
		this.statusesCount = statusesCount;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getProfileImageUrl() {
		return profileImageUrl;
	}

	public void setProfileImageUrl(String profileImageUrl) {
		this.profileImageUrl = profileImageUrl;
	}

	public String getProfileBackgroundImageUrl() {
		return profileBackgroundImageUrl;
	}

	public void setProfileBackgroundImageUrl(String profileBackgroundImageUrl) {
		this.profileBackgroundImageUrl = profileBackgroundImageUrl;
	}

	public String getProfileBackgroundTile() {
		return profileBackgroundTile;
	}

	public void setProfileBackgroundTile(String profileBackgroundTile) {
		this.profileBackgroundTile = profileBackgroundTile;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Calendar getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(Calendar createdAt) {
		this.createdAt = createdAt;
	}

	public boolean isVerified() {
		return verified;
	}

	public void setVerified(boolean verified) {
		this.verified = verified;
	}

	public String getSex() {
		String sex = this.getGender();
		if ("m".equals(sex))
			return "男";
		else if ("f".equals(sex))
			return "女";
		return "未知";
	}

	public String getProfileImg() {
		String imgUrl = this.getProfileImageUrl();
		return imgUrl.replace("\\50\\", "\\180\\");
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getProvinceName() {
		return province;
	}

	public String getCityName() {
		return city;
	}

	public String getTags() {
		return tags;
	}

	public void setTags(String tags) {
		this.tags = tags;
	}
}